.class Llt/noframe/gpsfarmguide/dialogs/TrackDialogs$15;
.super Ljava/lang/Object;
.source "TrackDialogs.java"

# interfaces
.implements Landroid/content/DialogInterface$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Llt/noframe/gpsfarmguide/dialogs/TrackDialogs;->editTrackName(Llt/noframe/gpsfarmguide/views/FragmentTracksList;Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Llt/noframe/gpsfarmguide/dialogs/TrackDialogs;

.field final synthetic val$fragment:Llt/noframe/gpsfarmguide/views/FragmentTracksList;

.field final synthetic val$input:Landroid/widget/EditText;

.field final synthetic val$track:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

.field final synthetic val$validator:Llt/noframe/gpsfarmguide/utils/Validator;


# direct methods
.method constructor <init>(Llt/noframe/gpsfarmguide/dialogs/TrackDialogs;Landroid/widget/EditText;Llt/noframe/gpsfarmguide/utils/Validator;Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;Llt/noframe/gpsfarmguide/views/FragmentTracksList;)V
    .locals 0

    .line 420
    iput-object p1, p0, Llt/noframe/gpsfarmguide/dialogs/TrackDialogs$15;->this$0:Llt/noframe/gpsfarmguide/dialogs/TrackDialogs;

    iput-object p2, p0, Llt/noframe/gpsfarmguide/dialogs/TrackDialogs$15;->val$input:Landroid/widget/EditText;

    iput-object p3, p0, Llt/noframe/gpsfarmguide/dialogs/TrackDialogs$15;->val$validator:Llt/noframe/gpsfarmguide/utils/Validator;

    iput-object p4, p0, Llt/noframe/gpsfarmguide/dialogs/TrackDialogs$15;->val$track:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    iput-object p5, p0, Llt/noframe/gpsfarmguide/dialogs/TrackDialogs$15;->val$fragment:Llt/noframe/gpsfarmguide/views/FragmentTracksList;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onClick(Landroid/content/DialogInterface;I)V
    .locals 2

    .line 424
    iget-object p2, p0, Llt/noframe/gpsfarmguide/dialogs/TrackDialogs$15;->val$input:Landroid/widget/EditText;

    invoke-virtual {p2}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object p2

    .line 425
    iget-object v0, p0, Llt/noframe/gpsfarmguide/dialogs/TrackDialogs$15;->val$validator:Llt/noframe/gpsfarmguide/utils/Validator;

    iget-object v1, p0, Llt/noframe/gpsfarmguide/dialogs/TrackDialogs$15;->val$input:Landroid/widget/EditText;

    invoke-virtual {v0, v1}, Llt/noframe/gpsfarmguide/utils/Validator;->isEmpty(Landroid/widget/EditText;)Z

    move-result v0

    if-nez v0, :cond_0

    .line 426
    iget-object v0, p0, Llt/noframe/gpsfarmguide/dialogs/TrackDialogs$15;->val$track:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->setName(Ljava/lang/String;)V

    .line 427
    new-instance v0, Llt/noframe/gpsfarmguide/database/DbTracks;

    invoke-direct {v0}, Llt/noframe/gpsfarmguide/database/DbTracks;-><init>()V

    iget-object v1, p0, Llt/noframe/gpsfarmguide/dialogs/TrackDialogs$15;->val$track:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;->getId()I

    move-result v1

    invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object p2

    invoke-virtual {v0, v1, p2}, Llt/noframe/gpsfarmguide/database/DbTracks;->updateName(ILjava/lang/String;)V

    .line 428
    invoke-interface {p1}, Landroid/content/DialogInterface;->dismiss()V

    .line 429
    iget-object p1, p0, Llt/noframe/gpsfarmguide/dialogs/TrackDialogs$15;->val$fragment:Llt/noframe/gpsfarmguide/views/FragmentTracksList;

    iget-object p2, p0, Llt/noframe/gpsfarmguide/dialogs/TrackDialogs$15;->val$track:Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;

    invoke-virtual {p1, p2}, Llt/noframe/gpsfarmguide/views/FragmentTracksList;->setItem(Llt/noframe/gpsfarmguide/sprayer/track/ModelTrack;)V

    :cond_0
    return-void
.end method
